#if !defined(_APP_COMMON)
#define _APP_COMMON
// #include <pthread.h>

typedef struct  
{
    char *ptr;
    int total_size;
    int len;
    int offset;
}Buffer;

Buffer * app_buffer_new(int size);  
void app_buffer_free(Buffer *buf);
int app_buffer_write(Buffer *buf, char *data, int len);
int app_buffer_read(Buffer *buf, char *data, int len);



#endif // _APP_COMMON
